
using System.Collections.Generic;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using Microsoft.VisualBasic;
using System.Collections;
using System.Diagnostics;
using System;


public partial class SpellCheckDialog
{

    public string Res = "Cancel";

    public SpellCheckDialog()
    {
        InitializeComponent();
    }
    public void SpellCheckDialog_Loaded(object sender, RoutedEventArgs e)
    {
        if (MS.WindowsAPICodePack.Internal.CoreHelpers.RunningOnVista || MS.WindowsAPICodePack.Internal.CoreHelpers.RunningOnWin7)
        {
            AppHelper.ExtendGlassFrame(this, new Thickness(-1, -1, -1, -1));

        }
    }

    public void OKButton_Click(object sender, RoutedEventArgs e)
    {
        Res = "OK";
        Close();
    }

    public void WordListBox_KeyDown(object sender, KeyEventArgs e)
    {
        if (e.Key == Key.Enter && WordListBox.SelectedItem != null)
        {
            OKButton_Click(null, null);
        }
    }

    public void WordListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
    {
        if (WordListBox.SelectedItem != null)
        {
            OKButton.IsEnabled = true;
        }
        else
        {
            OKButton.IsEnabled = false;
        }
    }
}


